<template>
	<view>
		<view class="header" :style="'padding-top: '+bartop+'px; padding-bottom:10rpx;background: rgba(0, 0, 0, 0);'">
			<view class="goodsmsgheader headertop" style="width: 100%;">
				<navigator open-type="navigateBack" style="padding:10rpx">
					<image src="/static/zfh.png" mode="aspectFit"></image>
				</navigator>
				<text style="font-size: 36rpx;
font-family: Source Han Sans CN;
font-weight: 600;
color: #000000;
">物业缴费</text>
				<!-- <image src="/static/goodsmsghei.png" mode="aspectFit" bindtap="showmsg" wx:if="{{cartlen=='00'?false:true}}"><text>{{cartlen}}</text></image> -->
			</view>
		</view>
		<view class="body">
			<image class="body" src="../../../static/lifewybj.png" mode="aspectFill"></image>
		</view>
		<view class="body1">
			<view class="top" style="border-radius: 20rpx;">
				<image src="../../../static/lifelb.png" mode=""></image>
				<view class="top1">
					关于账单问题，<text>点击这里</text> 反馈~
				</view>
			</view>
			<view class="qianfei" style="border-radius: 20rpx;">
				<view class="qianfei1">
					{{info.title}}
				</view>
				<view class="qianfei2" style="margin-bottom: 40rpx;">
					{{info.money}}<text style="font-size: 18rpx;">元</text>
				</view>
				<view class="qianfei1">
					房产信息
				</view>
				<view class="qianfei2">
					{{info.roomname}}
				</view>
				<view class="qianfei3">
					<view class="qianfei3-1">

					</view>
					<view class="qianfei1" style="margin: 0;">
						账单时间：{{info.month}}
					</view>
				</view>
			</view>

			<view class="box">
				<view class="box1">
					费用详情
				</view>
				<view class="box2" v-for="(item,index) in info.cdatas" :key="index">
					<view class="box2-1">
						{{item.title}}
					</view>
					<view class="box2-2">
						{{item.money}}元
					</view>
				</view>
				<view class="box2" v-for="(item,index) in info.gdatas" :key="index">
					<view class="box2-1">
						{{item.title}}
					</view>
					<view class="box2-2">
						{{item.money}}元
					</view>
				</view>
			</view>
			<view class="jiesuan" style="border-radius: 20rpx;">
				<view class="jiesuan1">
					<view class="jiesuan1-1">
						邻里豆({{info.linlidou}}个)
					</view>
					<!-- <view class="jiesuan1-2" @click="linlidou">
						<view class="">
							去选择
						</view>
						<image src="../../../static/yfh.png" mode=""></image>
					</view> -->
					<view class="jiesuan1-3">
						{{info.linlidoumoney}}元
					</view>
				</view>
				<view class="jiesuan1">
					<view class="jiesuan1-1">
						应付总额
					</view>
					<view class="jiesuan1-3">
						360.00元
					</view>
				</view>
				<view class="jiesuan1">
					<view class="jiesuan1-1">
						滞纳金
					</view>
					<view class="jiesuan1-3">
						9.70元
					</view>
				</view>
				<view class="jiesuan1" @click="xuanzeyujiao">
					<view class="jiesuan1-1">
						预缴下月物业费
					</view>
					<view class="jiesuan1-4">
						<view class="" v-show="yujiao"></view>
					</view>
				</view>
			</view>
			<view class="box" v-show="yujiao==1">
				<view class="box1">
					预缴费用详情
				</view>

				<view class="box2" v-for="(item,index) in info.yujiaolist" :key="index">
					<view class="box2-1">
						{{item.title}}
					</view>
					<view class="box2-2">
						{{item.money}}元
					</view>
				</view>
			</view>
			<view class="" style="width: 100rpx;height: 140rpx;"></view>
			<view class="button">
				<view class="button1">
					待支付 <text>{{info.zong}}元</text>
				</view>
				<view class="button2">
					立即付款
				</view>
			</view>

		</view>
		<uni-popup ref="popup" type="bottom">
			<view class="popup">
				<view class="popup-1">
					<view class="popup-1-1">
						邻里豆（300个）
					</view>
					<view class="popup-1-2">返回</view>
				</view>
				<view class="popup-2">
					使用规则
				</view>
				<view class="xian"></view>
				<view class="popup-3">
					<view class="popup-3-1">
						暂不使用邻里豆
					</view>
					<view class="popup-3-2">

					</view>
				</view>
				<view class="popup-3">
					<view class="popup-3-1">
						抵扣￥0.30元使用300邻里豆
					</view>
					<view class="popup-3-2">
						<image src="../../../static/d-x.png" mode=""></image>
					</view>
				</view>
				<view class="popup-3">
					<view class="popup-3-1">
						抵扣￥0.20元使用200邻里豆
					</view>
					<view class="popup-3-2">

					</view>
				</view>
				<view class="popup-3">
					<view class="popup-3-1">
						抵扣￥0.10元使用100邻里豆
					</view>
					<view class="popup-3-2">

					</view>
				</view>
				<view class="popup-4">
					确认提交
				</view>
			</view>
		</uni-popup>
	</view>
</template>

<script>
	//首页
	export default {
		data() {
			return {
				bartop: 0,
				id: '',
				info: {},
				yujiao: 0
			}
		},
		onLoad(e) {
			this.bartop = this.$bartop;
			this.id = e.id
			this.getinfo()
		},
		methods: {
			xuanzeyujiao() {
				if (this.yujiao == 0) {
					this.yujiao = 1
				} else {
					this.yujiao = 0
				}
				this.getinfo()
			},
			linlidou() {
				this.$refs.popup.open('bottom')
			},
			getinfo() {
				this.$post('center/zhangdaninfo', {
					id: this.id,
					isnext: this.yujiao
				}).then(res => {
					this.info = res.data
				})
			}

		}
	}
</script>

<style lang="scss">
	.body {
		width: 100vw;
		height: 100vh;
		position: fixed;
		top: 0;
		z-index: -1;
	}

	.body1 {
		position: absolute;
		top: 160rpx;

		.top {
			width: 90vw;
			margin: 10rpx 5vw;
			background-color: white;
			display: flex;
			align-items: center;
			padding: 20rpx;

			>image {
				width: 28rpx;
				height: 21rpx;
			}

			.top1 {
				margin-left: 20rpx;
				font-size: 24rpx;
				font-family: Source Han Sans CN;
				font-weight: 500;
				color: #999999;
				line-height: 20px;

				>text {
					color: #FF7800;
				}
			}
		}

		.qianfei {
			width: 90vw;
			margin: 20rpx 5vw;
			background-color: white;

			padding: 20rpx;

			.qianfei1 {
				font-size: 24rpx;
				font-family: Source Han Sans CN;
				font-weight: 500;
				color: #999999;
				line-height: 20px;
				margin-bottom: 20rpx;
			}

			.qianfei2 {
				font-size: 36rpx;
				font-family: Source Han Sans CN;
				font-weight: 600;
				color: #333333;
				line-height: 20px;
			}

			.qianfei3 {
				display: flex;
				align-items: center;
				margin-top: 40rpx;
			}

			.qianfei3-1 {
				width: 8rpx;
				height: 8rpx;
				border: 50%;
				margin: 0 10rpx;
				background-color: orange
			}
		}
	}

	.box {
		width: 90vw;
		margin: 20rpx 5vw;
		background-color: white;
		padding: 20rpx;
		border-radius: 20rpx;

		.box1 {
			font-size: 30rpx;
			font-family: Source Han Sans CN;
			font-weight: 600;
			color: #333333;
		}

		.box2 {
			margin: 20rpx 0;
			display: flex;
			justify-content: space-between;

			.box2-1 {
				font-size: 28rpx;
				font-family: Source Han Sans CN;
				font-weight: 400;
				color: #909399;
			}

			.box2-2 {
				font-size: 28rpx;
				font-family: Source Han Sans CN;
				font-weight: 400;
				color: #303133;
			}
		}
	}

	.jiesuan {
		width: 90vw;
		margin: 20rpx 5vw;
		background-color: white;
		padding: 20rpx;

		.jiesuan1 {
			margin: 20rpx 0;
			display: flex;
			justify-content: space-between;
			align-items: center;

			.jiesuan1-1 {
				font-size: 24rpx;
				font-family: Source Han Sans CN;
				font-weight: 500;
				color: #999999;
				line-height: 20px;
			}

			.jiesuan1-2 {
				display: flex;
				align-items: center;

				>view {
					font-size: 24rpx;
					font-family: Source Han Sans CN;
					font-weight: 500;
					color: #999999;
					line-height: 20px;
				}

				>image {
					margin-left: 10rpx;
					width: 11rpx;
					height: 20rpx;
				}
			}

			.jiesuan1-3 {
				font-size: 30rpx;
				font-family: Source Han Sans CN;
				font-weight: 500;
				color: #333333;
				line-height: 20px;
			}

			.jiesuan1-4 {
				width: 25rpx;
				height: 25rpx;
				border: #999999 solid 2rpx;
				border-radius: 50%;
				display: flex;
				align-items: center;
				justify-content: space-around;

				>view {
					width: 14rpx;
					height: 14rpx;
					background-color: #ff3030;
					border-radius: 50%;
				}
			}
		}
	}

	.button {
		position: fixed;
		padding: 20rpx 40rpx;
		bottom: 0;
		width: 100vw;
		background-color: white;
		display: flex;
		align-items: flex-end;
		justify-content: space-between;

		.button1 {
			font-size: 24rpx;
			font-family: Source Han Sans CN;
			font-weight: 500;
			color: #333333;

			>text {
				font-size: 40rpx;
				font-family: Source Han Sans CN;
				font-weight: 500;
				color: #FF7543;
			}
		}

		.button2 {
			background-image: url('../../../static/anniu1.png');
			background-size: 340rpx;
			width: 340rpx;
			height: 82rpx;
			font-size: 24rpx;
			font-family: Source Han Sans CN;
			font-weight: 500;
			color: #FFFFFF;
			line-height: 82rpx;
			text-align: center;
		}
	}

	.popup {
		width: 100vw;
		background-color: white;
		padding: 40rpx;

		.popup-1 {
			display: flex;
			justify-content: space-between;
			align-items: center;

			.popup-1-1 {
				font-size: 30rpx;
				font-family: Alibaba PuHuiTi;
				font-weight: 500;
				color: #000000;
			}

			.popup-1-2 {
				font-size: 24rpx;
				font-family: Alibaba PuHuiTi;
				font-weight: 400;
				color: #999999;
			}
		}

		.popup-2 {
			margin-top: 20rpx;
			font-size: 24rpx;
			font-family: Alibaba PuHuiTi;
			font-weight: 400;
			color: #999999;
		}

		.popup-3 {
			padding: 20rpx 0;
			display: flex;
			justify-content: space-between;
			align-items: center;

			.popup-3-1 {
				font-size: 30rpx;
				font-family: Source Han Sans CN;
				font-weight: 400;
				color: #333333;
			}

			.popup-3-2 {
				width: 34rpx;
				height: 34rpx;
				border: #999999 solid 2rpx;
				border-radius: 50%;

				>image {
					width: 34rpx;
					height: 34rpx;
				}
			}
		}

		.popup-4 {
			width: 650rpx;
			height: 120rpx;
			background-color: rgb(255, 174, 69);
			margin: 20rpx auto;
			font-size: 36rpx;
			line-height: 120rpx;
			text-align: center;
			font-family: Alibaba PuHuiTi;
			font-weight: 500;
			color: #FFFFFF;
			border-radius: 60rpx;
		}
	}

	.xian {
		width: 654rpx;
		height: 2rpx;
		margin: 20rpx auto;
		background-color: #efefef;
	}
</style>
